<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sign In</title>
    <meta name="author" content="supermen_IFI" />
    <meta name="keywords" content="" />
 	<meta name="description" content=""/>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    <!-- [template css] begin -->
	<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="css/960.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="css/print.css" type="text/css" media="print" /> 
    <script type="text/javascript" src="js/functions.js"></script>
</head>
<body>

	<!-- START TOP SECTION -->
	<div class="container_12">
	
		<!-- START LOGO -->
		<div class="grid_4 header">
			<img src="images/slider/banner-p7.jpg" alt="FEJOB" />
			<div align="right">
				<a href="SignIn.jsp" title="Sign In"><font size="3">Sign In</font></a>
			</div>	
		</div>
		<!-- END LOGO -->
   	 
		<!-- START NAVIGATION -->
   	  	<div class="grid_8 header">
   	  		<div id="navigation">
				<ul id="nav">
					<li id="home"><a href="Home.jsp" title="Home page">Home</a></li>
					<li id="about"><a href="About.html" title="About">About</a></li>
					<li id="search_job"><a href="SearchJob.jsp" title="Search Job" class="currentPage">Search Job</a></li>
					
				</ul>
			</div>
		</div>
		<!-- END NAVIGATION -->
		
		<div class="clear"></div>
	</div>
	<!-- END TOP SECTION -->
   
	<!-- START MEDIUM SECTION -->
	<div class="container_12 medium">
	
		<!-- START GET IN TOUCH TEXT -->
   		<div class="grid_6">
	   		<div class="getTouch">
	   			<h2><span class="orange">Login or Create an Account</span></h2>
	   			<p>
					This section is used to loggin or to create a new account.
	   			</p>
	   			
	   		</div>
   		</div>
   		<!-- END GET IN TOUCH TEXT -->
   	
		<div class="clear"></div>
		
	</div>
	<!-- END MEDIUM SECTION -->
 
	<!-- START BOTTOM SECTION -->
	<div class="container_12">
	
		<!-- START FORM -->
		<div  style="border: solid 1px #BBB6A5;float:left;width:45%;margin-right:10px">
			<div class="loginForm" style="margin:15px">
	   			<h2><span class="orange">Login</span></h2>	
				<form id="loginForm" action="ControllerUser" method="post">					
					<div class="formContent">
						<label for="name">Username<span class="name">required*</span></label>					
						<input type="text" name="name" id="name" class="input required" value="" />	
						<label for="log_password">Password<span class="name">required*</span></label>
						<input type="password" name="c_password" id="log_password" class="input required" value="" />						
						<input type="hidden" name="loginForm" value="1" />
						<input type="hidden" name="type" value="2" />
						<button class="submit" type="submit" name="Login" id="login_button" style="margin-top:10px">Login</button>
						<a onclick="forgot_password()" style="float:right;margin-top:10px">Forgot Your Password?</a>
					</div>
				</form>			
				<%  
		    		String login = (String) session.getAttribute("userlogin");
					if (login != null) {
						out.println("You don't have account here");
						out.println(login);
						session.removeValue("userlogin");
					}
		    	%> 		
	   		</div>
		</div>
		<div style="border: solid 1px #BBB6A5;width:45%;float:left;margin-left:10px">
			<div class="newaccountForm" style="margin:15px">
	   			<h2><span class="orange">Create new Account</span></h2>
				<form id="newaccountForm" action="ControllerUser" method="post">					
					<div class="formContent">
						<label for="name">Username<span class="name">required*</span></label>					
						<input type="text" name="name" id="name" class="input required" value="" />			
						<label for="new_password">Password<span class="name">required*</span></label>
						<input type="password" name="new_password" id="new_password" class="input required" value="" />
						<label for="c_password">Confirm Password<span class="name">required*</span></label>
						<input type="password" name="c_password" id="c_password" class="input required" value="" />
						<input type="hidden" name="contact_form" value="1" />
							<div>
							<label for="candidat">Type of user desired </label>	
							<div style="width:100px;float:left;padding-left:20px;">
								<label for="type">Candidat</label>	
								<input type="radio" name="type" id="type" value="0" />	
							</div>
							<div style="float:left">
								<label for="type">Entreprise</label>	
								<input type="radio" name="type" id="type" value="1" />	
							</div>
							
						</div><br><br><br>
						<button class="submit" type="submit" name="Submit" id="submit_button" style="margin-top:10px" onclick="checkPassword()">Submit</button>								
					</div>
				
				</form>	
				<%  
		    		login = (String) session.getAttribute("createlogin");
					if (login != null) {
						out.println("Ce login existe déja");
						out.println(login);
						session.removeValue("createlogin");
					}
		    	%> 			
	   		</div>
		</div>
		<!-- END FORM -->
	   	
	   	<div class="clear"></div>
	</div>
	<!-- END BOTTOM SECTION -->
	
   	<div class="clear"></div>
   	
	<!-- START FOOTER -->
   	<div class="container_12">
	   	<p class="footer">
	   		FEJOB_SUPERMAN_IFI
		</p>
	</div>
	<!-- END FOOTER -->
	
<!-- contact form validation -->
<script type="text/javascript">	
//<![CDATA[
  $(document).ready(function(){	
    $("#searchForm").validate({
		errorClass: "inputError",
		messages: {
			name: {
				required: ""				
			},
			email: {
				required: ""				
			}
		}
	})
  });
  function cancelAction() {
 	 document.location.href("SearchJob.jsp"); 
  }
//]]>
</script>
</body>
</html>